<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
	function check() {
		var uname=document.loginform.username;
		var pwd=document.loginform.userpwd;
		if(uname.value.length<=5){
			alert("用户名长度不能小于5位！")
			name.focus();
			name.select();
			return false;
		}
		if(pwd.value.length>=6&&pwd.value.length<=10){
			alert("密码长度必须在6-10位之间！")
			pwd.focus();
			pwd.select();
			return false;
		}
		return true;
	}
</script>
<title>用户登录</title>
</head>
<body>
	<h1>${ERROR}</h1>
	<form name="loginform" action="${pageContext.request.contextPath }/user/login" method="post" onsubmit="return check()">
		<input type="text" name="username" id="username" >
		<input type="password" name="userpwd" id="userpwd" maxlength="10">
		<input type="submit" value="登录">
	</form>
</body>
</html>